<!--
    功能面板集标签 FUNS
-->
<template>
    <div class="fun-panel-tabs">
        <a-tabs v-model:activeKey="activeKey" tabPosition="top">
            <a-tab-pane v-for="tab of menu" :key="tab.menuKey">
                <template #tab>
                    <rx-icon-show :icon="getTabIcon(tab.iconPc || tab.icon)"></rx-icon-show>
                    {{ getName(tab.name || tab.title) }}
                </template>
                <component :menuParams="tab.params" v-if="activeKey === tab.menuKey" :menuId="tab.id" :is="getTemplate(tab.component)"></component>
            </a-tab-pane>
        </a-tabs>
    </div>
</template>

<script>
import AppUtil from "../../../../assets/js/AppUtil";
import funPanelCommon from "./funPanelCommon";
export default {
    name: "FunPanelTabs",
    mixins: [funPanelCommon],
    data() {
        return {}
    },
    methods: {
        getTemplate(path) {
            return AppUtil.loadComponent(path)
        }
    }
}
</script>

<style scoped>
.fun-panel-tabs {
    height: 100%;
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.fun-panel-tabs ::v-deep(.ant-tabs) .ant-tabs-nav {
    margin-bottom: 10px;
}
</style>
